import MaxHeap from '../../../src/datastructure/heap/maxheap'

const maxHeap = new MaxHeap()
const arr = [32, 15, 39, 0, 47, 92, 85, 30, 59, 10]
for (const num of arr) {
  maxHeap.add(num)
}

console.log(maxHeap.data)

const max = maxHeap.extractMax()
console.log(max)

console.log(maxHeap.data)

maxHeap.heapify(arr)
console.log('heapify:', maxHeap.data)
